package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 用户钱包消费记录
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_user_wallet_consumption_log")
public class UserWalletConsumptionLog extends Model<UserWalletConsumptionLog> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "consumption_log_id", type = IdType.ASSIGN_ID)
    private String consumptionLogId;
    /**
     * 消费时间
     */
    @TableField("consumption_time")
    private LocalDateTime consumptionTime;
    /**
     * 消费金额
     */
    @TableField("consumption_amount")
    private BigDecimal consumptionAmount;
    /**
     * 钱包支付金额
     */
    @TableField("wallet_amount")
    private BigDecimal walletAmount;
    /**
     * 钱包赠送支付金额
     */
    @TableField("wallet_give_amount")
    private BigDecimal walletGiveAmount;
    /**
     * 消息子类型ID
     */
    @TableField("msg_type_child_id")
    private String msgTypeChildId;
    /**
     * 用户ID
     */
    @TableField("user_id")
    private String userId;
    /**
     * 消息类型
     */
    @TableField("msg_type")
    private String msgType;
    /**
     * 订单记录ID
     */
    @TableField("order_log_id")
    private String orderLogId;

    public void freeData() {
        this.consumptionLogId = null;
        this.consumptionTime = null;
        this.consumptionAmount = null;
        this.walletAmount = null;
        this.walletGiveAmount = null;
        this.msgTypeChildId = null;
        this.userId = null;
        this.msgType = null;
        this.orderLogId = null;
    }

}
